package cn.zust.ly.EyExample.Ey10;

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		String str = "";
		if (x == 0) {
			str = "0";
		}
		while (x>0) {
			str = String.valueOf(getCharByInt(x%16)) + str;
			//System.out.println(getCharByInt(x%16) + "---" + x);
			x /= 16;
		}
		System.out.println(str);
		
	}
	static char getCharByInt(int x) {
		if (x < 10) return (char)(48+x);
		else return (char) (55+x);
	}
}
